<template>
<!-- 评论 -->
  <div id="comment"> 
    <div class="commentBody">
        <div class="commentTitle" @click="commentTitleClick">
            <span :class="commentTitleGet?'commentTitleClick' : ''">收到的评论</span>
            <span :class="commentTitlePush?'commentTitleClick' : ''">发出的评论</span>
        </div>
        <div class="commentContent">
            <div class="commentCPList">
                <div class="commentCPListL">
                    <img src="../../../../assets/banner.png" alt="">
                </div>
                <div class="commentCPListR">
                    <div class="commentParent">
                        <div class="commentPTitle">
                            <span>独家记忆</span>
                            <span class="date">2017-03-17</span>
                            <i class="close" v-if="commentPush"></i>
                        </div>
                        <div class="commentPContent">
                            <span>After reading Clayton Christensen, Geoffrey Moore and Steve Blank, I was expecting a lot from The Lean Startup by Eric Ries. I was disappointed. It could be that I did not read it well or too fast, but I was expecting   make new mistakes. We do everything wrong. We build a mi After reading Clayton Christensen After reading Clayton Christensen...</span>
                            <span>全文</span>
                        </div>
                        <div class="commentPButtom" v-if="!commentPush">
                            <span>回复</span>
                        </div>
                    </div>
                    <div class="commentSeed">
                        <div class="commentSeedList">
                            <div class="commentSeedListL" v-if="!commentPush">
                                <img src="../../../../assets/banner.png" alt="">
                            </div>
                            <div class="commentSeedListR">
                                <div class="commentPTitle" v-if="!commentPush">
                                    <span>独家记忆</span>
                                    <span class="date">2017-03-17</span>
                                </div>
                                <div class="commentPTitle" v-else>
                                    <span>文章标题Randy Frazier文章标题 </span>
                                </div>
                                <div class="commentPContent">
                                    <span>After reading Clayton Christensen, Geoffrey Moore and Steve Blank, I was expecting a lot from The Lean Startup by Eric Ries. I was disappointed. It could be that I did not read it well or too fast, but I was expecting   make new mistakes. We do everything wrong. We build a mi After reading Clayton Christensen After reading Clayton Christensen...</span>
                                    <span>全文</span>
                                </div>
                                <div class="commentPButtom" v-if="!commentPush">
                                    <span>回复</span>
                                </div>
                            </div>
                        </div>
                        <!-- <div class="commentSeedList">
                            <div class="commentSeedListL">
                                <img src="../../../../assets/banner.png" alt="">
                            </div>
                            <div class="commentSeedListR">
                                <div class="commentPTitle">
                                    <span>独家记忆</span>
                                    <span class="date">2017-03-17</span>
                                </div>
                                <div class="commentPContent">
                                    <span>After reading Clayton Christensen, Geoffrey Moore and Steve Blank, I was expecting a lot from The Lean Startup by Eric Ries. I was disappointed. It could be that I did not read it well or too fast, but I was expecting   make new mistakes. We do everything wrong. We build a mi After reading Clayton Christensen After reading Clayton Christensen...</span>
                                    <span>全文</span>
                                </div>
                                <div class="commentPButtom" v-if="commentPush">
                                    <span>回复</span>
                                </div>
                            </div>
                        </div> -->
                    </div>
                    <div class="CPlistBtn" v-if="!commentPush">
                        <span><i></i>查看对话</span>
                        <span><i></i>删除</span>
                    </div>
                </div>
            </div>
        </div>
        <div class="paging">
            <Paging></Paging>
        </div>
    </div>
  </div>
</template>

<script>
  // 分页
  import Paging from '@/components/public/paging'
  export default {
    data () {
      return {
        commentData: '',
        commentTitleGet: true,
        commentTitlePush: false,
        commentPush: false
      }
    },
    mounted: function () {
      this.obtain()
    },
    methods: {
      obtain: function () {
        var T = this
        T.$http.get('../../../../../static/json/comment.json')
        .then(function (response) {
          T.commentData = response.data.data
        })
      },
      commentTitleClick: function (e) {
        var html = e.target.innerHTML
        if (html === '收到的评论') {
          this.commentTitleGet = true
          this.commentTitlePush = false
          this.commentPush = false
        } else {
          this.commentTitleGet = false
          this.commentTitlePush = true
          this.commentPush = true
        }
      }
    },
    components: {
      'Paging': Paging
    }
  }
</script>

<style scoped>
 @import "../../../../../static/knowChilde/comment.css";
</style>
